# Copyright (c) 2020 ARM Limited. All rights reserved.
# SPDX-License-Identifier: Apache-2.0

add_library(mbed-stm32g0cube-fw INTERFACE)

target_sources(mbed-stm32g0cube-fw
    INTERFACE
        STM32G0xx_HAL_Driver/stm32g0xx_hal.c
        STM32G0xx_HAL_Driver/stm32g0xx_hal_adc.c
        STM32G0xx_HAL_Driver/stm32g0xx_hal_adc_ex.c
        STM32G0xx_HAL_Driver/stm32g0xx_hal_cec.c
        STM32G0xx_HAL_Driver/stm32g0xx_hal_comp.c
        STM32G0xx_HAL_Driver/stm32g0xx_hal_cortex.c
        STM32G0xx_HAL_Driver/stm32g0xx_hal_crc.c
        STM32G0xx_HAL_Driver/stm32g0xx_hal_crc_ex.c
        STM32G0xx_HAL_Driver/stm32g0xx_hal_cryp.c
        STM32G0xx_HAL_Driver/stm32g0xx_hal_cryp_ex.c
        STM32G0xx_HAL_Driver/stm32g0xx_hal_dac.c
        STM32G0xx_HAL_Driver/stm32g0xx_hal_dac_ex.c
        STM32G0xx_HAL_Driver/stm32g0xx_hal_dma.c
        STM32G0xx_HAL_Driver/stm32g0xx_hal_dma_ex.c
        STM32G0xx_HAL_Driver/stm32g0xx_hal_exti.c
        STM32G0xx_HAL_Driver/stm32g0xx_hal_fdcan.c
        STM32G0xx_HAL_Driver/stm32g0xx_hal_flash.c
        STM32G0xx_HAL_Driver/stm32g0xx_hal_flash_ex.c
        STM32G0xx_HAL_Driver/stm32g0xx_hal_gpio.c
        STM32G0xx_HAL_Driver/stm32g0xx_hal_hcd.c
        STM32G0xx_HAL_Driver/stm32g0xx_hal_i2c.c
        STM32G0xx_HAL_Driver/stm32g0xx_hal_i2c_ex.c
        STM32G0xx_HAL_Driver/stm32g0xx_hal_i2s.c
        STM32G0xx_HAL_Driver/stm32g0xx_hal_irda.c
        STM32G0xx_HAL_Driver/stm32g0xx_hal_iwdg.c
        STM32G0xx_HAL_Driver/stm32g0xx_hal_lptim.c
        STM32G0xx_HAL_Driver/stm32g0xx_hal_pcd.c
        STM32G0xx_HAL_Driver/stm32g0xx_hal_pcd_ex.c
        STM32G0xx_HAL_Driver/stm32g0xx_hal_pwr.c
        STM32G0xx_HAL_Driver/stm32g0xx_hal_pwr_ex.c
        STM32G0xx_HAL_Driver/stm32g0xx_hal_rcc.c
        STM32G0xx_HAL_Driver/stm32g0xx_hal_rcc_ex.c
        STM32G0xx_HAL_Driver/stm32g0xx_hal_rng.c
        STM32G0xx_HAL_Driver/stm32g0xx_hal_rtc.c
        STM32G0xx_HAL_Driver/stm32g0xx_hal_rtc_ex.c
        STM32G0xx_HAL_Driver/stm32g0xx_hal_smartcard.c
        STM32G0xx_HAL_Driver/stm32g0xx_hal_smartcard_ex.c
        STM32G0xx_HAL_Driver/stm32g0xx_hal_smbus.c
        STM32G0xx_HAL_Driver/stm32g0xx_hal_smbus_ex.c
        STM32G0xx_HAL_Driver/stm32g0xx_hal_spi.c
        STM32G0xx_HAL_Driver/stm32g0xx_hal_spi_ex.c
        STM32G0xx_HAL_Driver/stm32g0xx_hal_tim.c
        STM32G0xx_HAL_Driver/stm32g0xx_hal_tim_ex.c
        STM32G0xx_HAL_Driver/stm32g0xx_hal_uart.c
        STM32G0xx_HAL_Driver/stm32g0xx_hal_uart_ex.c
        STM32G0xx_HAL_Driver/stm32g0xx_hal_usart.c
        STM32G0xx_HAL_Driver/stm32g0xx_hal_usart_ex.c
        STM32G0xx_HAL_Driver/stm32g0xx_hal_wwdg.c
        STM32G0xx_HAL_Driver/stm32g0xx_ll_adc.c
        STM32G0xx_HAL_Driver/stm32g0xx_ll_comp.c
        STM32G0xx_HAL_Driver/stm32g0xx_ll_crc.c
        STM32G0xx_HAL_Driver/stm32g0xx_ll_crs.c
        STM32G0xx_HAL_Driver/stm32g0xx_ll_dac.c
        STM32G0xx_HAL_Driver/stm32g0xx_ll_dma.c
        STM32G0xx_HAL_Driver/stm32g0xx_ll_exti.c
        STM32G0xx_HAL_Driver/stm32g0xx_ll_gpio.c
        STM32G0xx_HAL_Driver/stm32g0xx_ll_i2c.c
        STM32G0xx_HAL_Driver/stm32g0xx_ll_lptim.c
        STM32G0xx_HAL_Driver/stm32g0xx_ll_lpuart.c
        STM32G0xx_HAL_Driver/stm32g0xx_ll_pwr.c
        STM32G0xx_HAL_Driver/stm32g0xx_ll_rcc.c
        STM32G0xx_HAL_Driver/stm32g0xx_ll_rng.c
        STM32G0xx_HAL_Driver/stm32g0xx_ll_rtc.c
        STM32G0xx_HAL_Driver/stm32g0xx_ll_spi.c
        STM32G0xx_HAL_Driver/stm32g0xx_ll_tim.c
        STM32G0xx_HAL_Driver/stm32g0xx_ll_ucpd.c
        STM32G0xx_HAL_Driver/stm32g0xx_ll_usart.c
        STM32G0xx_HAL_Driver/stm32g0xx_ll_usb.c
        STM32G0xx_HAL_Driver/stm32g0xx_ll_utils.c
        system_stm32g0xx.c
)

target_include_directories(mbed-stm32g0cube-fw
    INTERFACE
        .
        CMSIS
        STM32G0xx_HAL_Driver
        STM32G0xx_HAL_Driver/Legacy
)
